package com.bosssoft.trainee.nontax.util.mapper.dtoVo;

import com.bosssoft.trainee.nontax.entity.dto.RoleDto;
import com.bosssoft.trainee.nontax.entity.vo.RoleVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @Description: role dto vo transform util class
 * @Author: Luo WenLong
 * @Date: 2022/6/25 9:02
 */
@Mapper(componentModel = "spring")
public interface RoleDtoVo {
    /**
     * @Description: dto to vo
     * @param roleDto role
     * @return: com.bosssoft.trainee.nontax.entity.vo.RoleVo
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:11
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    RoleVo dto2vo(RoleDto roleDto);

    /**
     * @Description: dto to vo
     * @param roleDto role list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.vo.RoleVo>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:12
     */
    List<RoleVo> dto2vo(List<RoleDto> roleDto);

    /**
     * @Description: vo tp dto
     * @param roleVo role
     * @return: com.bosssoft.trainee.nontax.entity.dto.RoleDto
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:14
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    RoleDto vo2dto(RoleVo roleVo);

    /**
     * @Description: vo tp dto
     * @param roleVo role list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.dto.RoleDto>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:14
     */
    List<RoleDto> vo2dto(List<RoleVo> roleVo);
}
